export const getFormConfig = (type, configData) => {
    switch (type) {
        case '0':
            return {
                formItems: [
                    { component: 'inputNumber', pattern: 'simple', name: 'orderMinAmount', label: '满金额', span: 12, options: { precision: 2 } },
                    { component: 'inputNumber', pattern: 'simple', name: 'couponAmount', label: '优惠金额', span: 12, options: { precision: 2 } },
                ]
            }
            break;
            case '1':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'minQty', label: '至少数', span: 12, options: { min: 0} },
                        { component: 'inputNumber', pattern: 'simple', name: 'couponAmount', label: '优惠金额', span: 12, options: { precision: 2 } },
                    ]
                }
            break;
            case '2':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'minQty', label: '至少数', span: 12, options: { min: 0} },
                        { component: 'input', pattern: 'simple', name: 'discount', label: '折扣比', span: 12, options: {append:'%'} },
                    ]
                }
            break;
            case '3':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'orderMinAmount', label: '满金额', span: 12, options: { precision: 2 } },
                        { component: 'input', pattern: 'simple', name: 'discount', label: '折扣比', span: 12, options: {append:'%'} },
                    ]
                }
            break;
            case '4': case '7':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'orderMinAmount', label: '满金额', span: 12, options: { precision: 2 } },
                    ]
                }
            break;
            case '5':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'minQty', label: '至少数', span: 12, options: { min: 0} }
                    ]
                }
            break;
            case '6':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'minQty', label: '至少数', span: 12, options: { min: 0} },
                        { component: 'inputNumber', pattern: 'simple', name: 'giftQty', label: '赠送数', span: 12, options: { min: 0} }
                    ]
                }
            break;
            case '11':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'giftPoints', label: '赠送积分', span: 12, options: { min: 0} },
                        { component: 'inputNumber', pattern: 'simple', name: 'couponAmount', label: '优惠金额', span: 12, options: { precision: 2 } },
                    ]
                }
            break;
            case '9':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'discountPrice', label: '优惠价', span: 12, options: { min: 0} },
                        { component: 'inputNumber', pattern: 'simple', name: 'limitQty', label: '限购数', span: 12, options: { min: 0} }
                    ]
                }
            break;
            case '10':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'orderMinAmount', label: '满金额', span: 12, options: { precision: 2 } },
                        { component: 'inputNumber', pattern: 'simple', name: 'giftPoints', label: '赠送积分', span: 12, options: { min: 0} },
                        { component: 'switchv', name: 'calculatePointsAsPercent', label: '是否按比列赠送积分', span: 12, options: {} },
                    ]
                }
            break;
            case '12':
                return {
                    formItems: [
                        { component: 'inputNumber', pattern: 'simple', name: 'orderMinAmount', label: '满金额', span: 12, options: { precision: 2 } }
                    ]
                }
            break;
            default:
                return {
                    formItems: [
                    ]
                }
    }
}